const express = require('express')
const app = express()
const bodyParser = require('body-parser')
const path = require('path')
const cors = require('cors')
//启动db连接
require('./db/connect')

const command = require('./router/command')

app.use(cors())
app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())
app.use('/public', express.static(path.join(__dirname, './public')));

app.use('/command', command)



console.log('server running http://localhost:11120')
app.listen(11120)